package liuwanghui.mapper;

import liuwanghui.dto.request.UserQueryDTO;
import liuwanghui.dto.request.UserUpdateDTO;
import liuwanghui.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface AdminMapper {
    List<User> findUsersBySearch(UserQueryDTO params);
    User findUserById(@Param("id") Long id);
    void updateUser(@Param("id") Long id, @Param("dto") UserUpdateDTO dto);
    void updateUserStatus(@Param("id") Long id, @Param("status") String status);
    Integer getUserCount();
    Integer getOrderCount();
    Integer getProductCount();
    BigDecimal getTradingAmount();
    void resetUserPassword(@Param("userId") Long userId, @Param("newPassword") String newPassword);
} 